﻿using WeDonekRpc.Helper.Validate;
namespace Shop.RemoteModel.Goods.Model
{
    public class GoodsSet
    {
        /// <summary>
        /// 商品名
        /// </summary>
        [NullValidate("shop.goods.name.null")]
        [LenValidate("shop.goods.name.len", 2, 50)]
        public string GoodsName { get; set; }
        /// <summary>
        /// Spu
        /// </summary>
        [LenValidate("shop.goods.spu.len", 0, 64)]
        [FormatValidate("shop.goods.spu.error", ValidateFormat.数字字母)]
        public string GoodsSpu { get; set; }

        /// <summary>
        /// 主图
        /// </summary>
        [LenValidate("shop.goods.img.len", 0, 150)]
        [FormatValidate("shop.goods.img.error", ValidateFormat.图片URI)]
        public string MainImg { get; set; }
        /// <summary>
        /// 类目ID
        /// </summary>
        [NumValidate("shop.category.id.error", 1)]
        public long CategoryId { get; set; }

        /// <summary>
        /// 品牌名
        /// </summary>
        [LenValidate("shop.goods.brand.name.len", 0, 50)]
        public string BrandName { get; set; }

        /// <summary>
        /// 应用的物流ID
        /// </summary>
        [NumValidate("shop.logistics.id.error", 1)]
        public long? LogisticsId { get; set; }

        /// <summary>
        /// 是否为虚拟商品
        /// </summary>
        public bool IsVirtual { get; set; }

        /// <summary>
        /// 服务说明
        /// </summary>
        public GoodsServeShow[] ServerShow { get; set; }

        public long[] FileId
        {
            get;
            set;
        }
    }
}
